import { http } from "@/utils/http";
import { baseUrlApi } from "../utils";

// 提交学入驻平台信息
export const SupplierEnterpriseInfoCreate = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/SupplierEnterpriseInfo/Create"),
    { data }
  );
};

// 入驻平台企业列表
export const SupplierEnterpriseInfoGetAllByPagedAndSort = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/SupplierEnterpriseInfo/GetAllByPagedAndSort"),
    { data }
  );
};

// // 锁定
// 创建协议
export const SupplierEnterpriseInfoIsUnlocked = (params: string) => {
  return http.request<any>(
    "post",
    baseUrlApi("/SupplierEnterpriseInfo/IsUnlocked?" + params),
  );
};

//删除供应商
export const SupplierEnterpriseInfoDelete = (params: string) => {
  return http.request<any>(
    "post",
    baseUrlApi("/SupplierEnterpriseInfo/Delete?" + params)
  );
};

// 获取产品名称
export const ProductInStockGetProductCategoriesName = () => {
  return http.request<any>(
    "get",
    baseUrlApi("/ProductInStock/GetProductCategoriesName")
  );
};

//新增产品到货
export const ProductInStockCreate = (params: string) => {
  return http.request<any>(
    "post",
    baseUrlApi("/Product/UpdateProductQuantity?" + params)
  );
};

// 创建产品分类
export const ProductInStockGetProductCategoryNums = (params: String, data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/ProductInStock/GetProductCategoryNums?" + params),
    {
      data
    }
  );
};

// 获取协议编号
export const ProcurementCooperationGetContractNumber = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/ProcurementCooperation/GetContractNumber?" + params)
  );
};

// 创建协议
export const ProcurementCooperationCreate = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/ProcurementCooperation/Create"),
    {
      data
    }
  );
};

//协议详情
export const ProcurementCooperationGetInfo = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/ProcurementCooperation/GetInfo?" + params)
  );
};
//供应商融资评级列表
export const FinancingApprovalQuotaGetAllByPagedAndSort = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/FinancingApprovalQuota/GetAllByPagedAndSort"),
    {
      data
    }
  );
};

//供应商融资核定列表
export const FinancingApprovalQuotaGetAllFinancingAlgorithmByPagedAndSort = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/FinancingApprovalQuota/GetAllFinancingAlgorithmByPagedAndSort"),
    {
      data
    }
  );
};
//供应商融资申请核定
export const GetUnsettledAndUnfinancedPurchaseOrdersName = (params: string) => {
  return http.request<any>(
    "post",
    baseUrlApi("/AccountsReceivableCertificate/GetUnsettledAndUnfinancedPurchaseOrdersName?" + params)
  );
};

//新建融资核定
export const FinancingApprovalQuotaCreate = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/FinancingApprovalQuota/Create"),
    {
      data
    }
  );
};
//平台采购
//采购列表
export const PurchaseOrdersGetAllByPagedAndSort = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/PurchaseOrders/GetAllByPagedAndSort"),
    {
      data
    }
  );
};
// 获取已经锁定的供应商成功  -- 甲方
export const SupplierEnterpriseInfoGetLockedInfo = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/SupplierEnterpriseInfo/GetLockedInfo"),
    {
      data
    }
  );
};


// 获取采购订单编号
export const PurchaseOrdersGetOrderNumber = (params: string) => {
  return http.request<any>("get", baseUrlApi("/PurchaseOrders/GetOrderNumber?" + params));
};

//获取付款约定
export const GetDictionaryByDictCode = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/Dictionary/GetDictionaryByDictCode?" + params)
  );
};

export const GetSignedSupplierEnterpriseInfoNames = (data: object) => {
  return http.request<any>("post", baseUrlApi("/ProcurementCooperation/GetSignedSupplierEnterpriseInfoNames"),
    {
      data
    });
};

//添加采购
export const PurchaseOrdersCreate = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/PurchaseOrders/Create"),
    {
      data
    }
  );
};
//获取订单详情
export const PurchaseOrdersGetInfoById = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/PurchaseOrders/GetInfoById?" + params)
  );
};

//修改订单状态
export const PurchaseOrdersUpdateOrderStatus = (params: string) => {
  return http.request<any>(
    "post",
    baseUrlApi("/PurchaseOrders/UpdateOrderStatus?" + params)
  );
};


// 分页获取采购合作协议列表
export const ProcurementCooperationGetAllByPagedAndSort = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/ProcurementCooperation/GetAllByPagedAndSort"),
    {
      data
    }
  );
};
//获取采购商品类别
export const GetProductCategoriesName = () => {
  return http.request<any>("post", baseUrlApi("/Product/GetProductCategoriesName"));
};


// 签订
export const ProcurementCooperationUpdateSignStatus = (params: string) => {
  return http.request<any>(
    "post",
    baseUrlApi("/ProcurementCooperation/UpdateSignStatus?" + params)
  );
};


// 合同管理
//获取合同编号
export const GetContractNumber = (params: string) => {
  return http.request<any>("get", baseUrlApi("/PurchaseSaleContract/GetContractNumber?" + params));
};
//获取合同列表
export const PurchaseSaleContractGetAllByPagedAndSort = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/PurchaseSaleContract/GetAllByPagedAndSort"),
    {
      data
    }
  );
};
//新建合同
export const PurchaseSaleContractCreate = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/PurchaseSaleContract/Create"),
    {
      data
    }
  );
};
//修改合同状态
export const PurchaseOrdersUpdateContractStatus = (params: string) => {
  return http.request<any>(
    "post",
    baseUrlApi("/PurchaseSaleContract/UpdateContractStatus?" + params)
  );
};

// 获取采购项目名称
export const PurchaseOrdersGetAllPurchaseOrdersName = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/PurchaseOrders/GetAllPurchaseOrdersName?" + params)
  );
};


//发货
//获取发货单编号
export const ProductShipmentOrdersGetShippingCode = () => {
  return http.request<any>(
    "get",
    baseUrlApi("/ProductShipmentOrders/GetShippingCode")
  );
};
//获取可以发货的订单
export const GetAllHaveSignedContractPurchaseOrdersName = (params: string) => {
  return http.request<any>("get", baseUrlApi("/PurchaseOrders/GetAllHaveSignedContractPurchaseOrdersName?" + params));
};

//修改发货单的确认状态  0未确认 1已入库（可确认） 2已确认
export const ConfirmInWarehouse = (params: string) => {
  return http.request<any>("post", baseUrlApi("/ProductDeliveryOrder/ConfirmInWarehouse?" + params));
};
export const ProductShipmentOrdersGetAllByPagedAndSort = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/ProductShipmentOrders/GetAllByPagedAndSort"),
    {
      data
    }
  );
};

//获取发货单列表after
export const ProductShipmentOrdersGetAllByPagedAndSortAfter = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/ProductShipmentOrders/GetAllByPagedAndSortAfter"),
    {
      data
    }
  );
};
//新建发货单
export const ProductShipmentOrdersCreate = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/ProductShipmentOrders/Create"),
    {
      data
    }
  );
};

//修改发货单状态
export const ProductShipmentOrdersUpdateWhetherShip = (params: String, data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/ProductShipmentOrders/UpdateWhetherShip?" + params),
    {
      data
    }
  );
};

//受理送货单
export const AcceptConsignment = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/ProductDeliveryOrder/AcceptConsignment?" + params)
  );
};

///出库/////////////
//获取发货单信息(未出库)
export const ProductShipmentOrdersGetInfoByPurchaseOrderId = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/ProductShipmentOrders/GetInfoByPurchaseOrderId?" + params)
  );
};
export const ProductShipmentOrdersGetInfoByPurchaseOrderIdAfterHaveBeenShipped = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/ProductShipmentOrders/GetInfoByPurchaseOrderIdAfterHaveBeenShipped?" + params)
  );
};
export const ProductOutStockOrderGetAllByPagedAndSort = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/ProductOutStockOrder/GetAllByPagedAndSort"),
    {
      data
    }
  );
};
//修改出库单状态
export const ProductOutStockOrderUpdateOutStcokStatus = (params: string) => {
  return http.request<any>(
    "post",
    baseUrlApi("/ProductOutStockOrder/UpdateOutStcokStatus?" + params),
  );
};


//在出库单状态获取是否入库
export const GetInfoByPurchaseOrderId = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/ProductInStock/GetInfoByPurchaseOrderId?" + params),
  );
};

//平台入库
export const ProductInStockOrderGetAllByPagedAndSort = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/ProductInStock/GetAllByPagedAndSort"),
    {
      data
    }
  );
};

//平台库存
export const GetProductInStockCategoryNums = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/ProductInStock/GetProductInStockCategoryNums?" + params)
  );
};
//入库单编号
export const ProductInStockGetInboundNumber = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/ProductInStock/GetInboundNumber?" + params)
  );
};

//出库单编号
export const ProductOutStockGetInboundNumber = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/ProductOutStockOrder/GetOutboundNumber?" + params)
  );
};

//修改入库单状态
export const UpdateProductInStockStatus = (params: string) => {
  return http.request<any>(
    "post",
    baseUrlApi("/ProductInStock/UpdateProductInStockStatus?" + params),
  );
};


//算法
//获取信用评级模型列表
export const AlgorithmicCreditGetAllByPagedAndSort = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/AlgorithmSaveResult/GetAllByPagedAndSort"),
    {
      data
    }
  );
};
export const AlgorithmCreate = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/AlgorithmicCreditEvaluationModel/Create"),
    {
      data
    }
  );
};

//保存模型
export const SaveBSSpneuralnetworkalgorithmResult = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/AlgorithmSaveResult/SaveBSSpneuralnetworkalgorithmResult"),
    {
      data
    }
  );
};

//查看模型详情
export const GetInfoByAcrmId = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/AlgorithmSaveResult/GetInfoByAcrmId?" + params),
  );
};

//应付款数据接口
export const GetHaveInStockPurchaseSupplierEnterprise = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/SupplierEnterpriseInfo/GetHaveInStockPurchaseSupplierEnterprise"),
    {
      data
    }
  );
};

export const GetHaveSignedPurchaseOrderContract = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/PurchaseSaleContract/GetHaveSignedPurchaseOrderContract?" + params),
  );
};
//新建应收账款凭证
export const AccountsReceivableCertificateCreate = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/AccountsReceivableCertificate/Create"),
    {
      data
    }
  );
};

//获取应收账款列表
export const AccountsReceivableCertificateGetAllByPagedAndSort = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/AccountsReceivableCertificate/GetAllByPagedAndSort"),
    {
      data
    }
  );
};


//信用评级获取算法选项数据
export const AlgorithmSaveResultGetAllNamesOptions = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/AlgorithmSaveResult/GetAllNamesOptions?" + params),
  );
};

//测算评级
export const AlgorithmicCreditEvaluationModelAlgorithmAnalysis = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/AlgorithmicCreditEvaluationModel/AlgorithmAnalysis"),
    {
      data
    }
  );
};

export const CreateQuotaAssessmentModel = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/FinancingApprovalQuota/CreateQuotaAssessmentModel"),
    {
      data
    }
  );
};


//删除该订单的输入供应商数据
export const FinancingApprovalQuotaDelete = (params: string) => {
  return http.request<any>(
    "post",
    baseUrlApi("/FinancingApprovalQuota/Delete?" + params),
  );
};



export const GetAccountsReceivableAmountFinancingApproval = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/ApplyPaymentSettlement/GetAccountsReceivableAmountFinancingApproval?" + params),
  );
};


//判断供应商自定义数据是否已经输入
export const GetQuotaUserExtise = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/FinancingApprovalQuota/GetQuotaUserExtise?" + params),
  );
};
//测算结果保存
export const EvaluationAlgorithmResultCreate = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/EvaluationAlgorithmResult/Create"),
    {
      data
    }
  );
};

//获取测算结果
export const EvaluationAlgorithmResultGetInfo = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/EvaluationAlgorithmResult/GetInfo?" + params),
  );
};

//未申请融资额度核定且未结算的采购项目接口
export const GetHaveNotAppliedFinancingLineApprovalPurchase = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/PurchaseOrders/GetHaveNotAppliedFinancingLineApprovalPurchase?" + params)
  );
};
//获取订单详情
export const GetOrderInformation = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/PurchaseSaleContract/GetOrderInformation?" + params),
  );
};
//根据采购项目显示结算时间（付款承诺时间)
export const GetSettlementtime = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/PurchaseOrders/GetSettlementtime?" + params),
  );
};

//新增申请货款结算
export const ApplyPaymentSettlementCreate = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/ApplyPaymentSettlement/Create"),
    {
      data
    }
  );
};
//可以融资的结算下拉
export const CompleteTheProjectApprovedFinancingLine = (params: String, data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/FinancingApprovalQuota/CompleteTheProjectApprovedFinancingLine?" + params),
    {
      data
    }
  );
};

//线上结算下拉
export const CompleteTheProjectApprovedOnLine = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/FinancingApprovalQuota/CompleteTheProjectApprovedOnLine"),
    {
      data
    }
  );
};

//分页获取申请货款结算信息列表
export const ApplyPaymentSettlementGetAllByPagedAndSort = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/ApplyPaymentSettlement/GetAllByPagedAndSort"),
    {
      data
    }
  );
};


//分页获取供应链金融结算列表成功
export const GetAllfinancingSupplyChainFinanceSettlementBeenSubmitted = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/ApplyPaymentSettlement/GetAllfinancingSupplyChainFinanceSettlementBeenSubmitted"),
    {
      data
    }
  );
};

//通过settmentid
export const ApplyPaymentSettlementUpdatePaymentStatus = (params: string) => {
  return http.request<any>(
    "post",
    baseUrlApi("/ApplyPaymentSettlement/UpdatePaymentStatus?" + params)
  );
};

//通过assetPOOLid spv给金融公司
export const UpdatePaymentStatusByAssetPoolId = (params: string) => {
  return http.request<any>(
    "post",
    baseUrlApi("/ApplyPaymentSettlement/UpdatePaymentStatusByAssetPoolId?" + params)
  );
};


export const ApplyPaymentSettlementUpdateRouteType = (params: string) => {
  return http.request<any>(
    "post",
    baseUrlApi("/ApplyPaymentSettlement/UpdateRouteType?" + params)
  );
};

//获取资产证券化的融资项目显示采购项目名称成功
export const GetFinancingAssetSecuritizationNameTheProcurementItem = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/ApplyPaymentSettlement/GetFinancingAssetSecuritizationNameTheProcurementItem?" + params)
  );
};

//创建资产池
export const AssetPoolGetAllByPagedAndSort = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/AssetPool/GetAllByPagedAndSort"),
    { data }
  );
};
//新建资产池
export const AssetPoolCreate = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/AssetPool/Create"),
    { data }
  );
};

export const AssetPoolGetAssetPoolName = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/AssetPool/GetAssetPoolNames?" + params)
  );
};

export const GetSmallLoanCreditbalance = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/AssetPool/GetSmallLoanCreditbalance?" + params)
  );
};

export const GetBusinessDate = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/Spv/GetBusinessDate?" + params)
  );
};

//新建spv
export const SpvCreate = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/Spv/Create"),
    { data }
  );
};

export const SpvGetAllByPagedAndSort = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/Spv/GetAllByPagedAndSort"),
    { data }
  );
};

//资产转移的下拉数据
export const GetAssetTransferNames = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/AssetTransfer/GetAssetTransferNames"),
    { data }
  );
};

export const AssetTransferGetAllByPagedAndSort = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/AssetTransfer/GetAllByPagedAndSort"),
    { data }
  );
};

export const AssetTransferCreate = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/AssetTransfer/Create"),
    { data }
  );
};

//修改转移资产状态
export const UpdateIsTransfer = (params: string) => {
  return http.request<any>(
    "post",
    baseUrlApi("/AssetTransfer/UpdateIsTransfer?" + params)
  );
};

//信用增级列表
export const GetHaveAssetTransferedPagedAndSort = (params: string) => {
  return http.request<any>(
    "post",
    baseUrlApi("/SecurityCreditRating/GetHaveAssetTransferedPagedAndSort?" + params)
  );
};
//信用增级的下拉数据
export const GetHaveAssetTransferedProjectName = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/AssetTransfer/GetHaveAssetTransferedProjectName"),
    { data }
  );
};

export const AssetSecuritizationCreate = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/AssetSecuritization/Create"),
    { data }
  );
};


export const GetCreditEnhancement = (params: string) => {
  return http.request<any>(
    "post",
    baseUrlApi("/AssetSecuritization/GetCreditEnhancement?" + params)
  );
};



export const GetExcessCollateral = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/AssetSecuritization/GetExcessCollateral?" + params)
  );
};

// 获取发行规模（也就是融资金额）
export const GetCreditEnhancementInfoByAssetPoolId = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/ApplyPaymentSettlement/GetCreditEnhancementInfoByAssetPoolId?" + params)
  );
};


export const GetAssetSecuritization = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/AssetSecuritization/Get?" + params)
  );
};

export const IsExtiseYieldRate = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/AssetSecuritization/IsExtiseYieldRate?" + params)
  );
};
//获取增级了的利率
export const GetYieldRate = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/AssetSecuritization/GetYieldRate?" + params)
  );
};




export const ProjectProposalCreate = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/ProjectProposal/Create"),
    { data }
  );
};
export const GetAllByAssetTransferId = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/ProjectProposal/GetAllByAssetTransferId"),
    { data }
  );
};

export const GetInfoByAssetTransferId = (params: string) => {
  return http.request<any>(
    "post",
    baseUrlApi("/ProjectProposal/GetInfoByAssetTransferId?" + params)
  );
};


//获取信用评级下拉
export const GetProjectProposalNames = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/ProjectProposal/GetProjectProposalNames"),
    { data }
  );
};

//获取产品期限
export const GetProductTerm = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/ProjectProposal/GetProductTerm?" + params)
  );
};

export const GetByAssetTransferId = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/ProjectProposal/GetByAssetTransferId?" + params)
  );
};


export const AssetTransferGetSmallLoanCreditbalance = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/AssetTransfer/GetSmallLoanCreditbalance?" + params)
  );
};

export const GetSPVName = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/AssetTransfer/GetSPVName?" + params)
  );
};


export const GetStockExchangeName = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/AssetPool/GetStockExchangeName?" + params)
  );
};
//获取发行利率
export const GetPriorityHierarchy = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/AssetSecuritization/GetPriorityHierarchy?" + params)
  );
};

export const SecurityCreditRatingCreate = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/SecurityCreditRating/Create"),
    { data }
  );
};

export const SecurityCreditRatingGetAll = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/SecurityCreditRating/GetAll"),
    { data }
  );
};

export const PredeterminedRating = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/SecurityCreditRating/PredeterminedRating?" + params)
  );
};
//证券发售列表/api/SecurityCreditRating/GetSecurityCreditRatingPageSet
export const GetSecurityCreditRatingPageSet = (params: string) => {
  return http.request<any>(
    "post",
    baseUrlApi("/SecurityCreditRating/GetSecurityCreditRatingPageSet?" + params)
  );
};
//发售证券额信用下拉
export const SecurityCreditRatingGetHaveAssetTransferedProjectName = () => {
  return http.request<any>(
    "post",
    baseUrlApi("/SecurityCreditRating/GetHaveAssetTransferedProjectName")
  );
};

//发售证券额信用下拉
export const GetFilterSecurityCreditRating = () => {
  return http.request<any>(
    "post",
    baseUrlApi("/SecurityCreditRating/GetFilterSecurityCreditRating")
  );
};

export const SecuritiesDeclarationProfilesCreate = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/SecuritiesDeclarationProfiles/Create"),
    { data }
  );
};

export const GetAllDeclarationProfiles = (params: string) => {
  return http.request<any>(
    "post",
    baseUrlApi("/SecuritiesDeclarationProfiles/GetAll?" + params)
  );
};

export const SecurityCreditRatingGetInfo = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/SecurityCreditRating/GetInfo?" + params)
  );
};

//获取可以审批的项目
export const GetExamineApproveProjectName = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/SecurityCreditRating/GetExamineApproveProjectName"),
    {
      data
    }
  );
};

export const SecurityCreditRatingApprove = (params: string) => {
  return http.request<any>(
    "post",
    baseUrlApi("/SecurityCreditRating/Approve?" + params)
  );
};
//获取审批完的项目(发行公告)
export const GetPassAuditProjectName = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/SecurityCreditRating/GetPassAuditProjectName"),
    {
      data
    }
  );
};

//转账
export const TransactionsOredrsCreate = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/TransactionsOredrs/Create"),
    {
      data
    }
  );
};

// 1 为 普通的转账 2 为 证券清偿 3 为资产池抓取
//判断该订单能否转账
export const IsTransferService = (params: String, data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/SecuritiesServiceCharg/IsTransferService?" + params), {
    data
  }
  );
};

//增加转账记录
export const SecuritiesServiceChargCreate = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/SecuritiesServiceCharg/Create"),
    { data }
  );
};

//获取type1 3 的一层列表
export const GetSecuritiesHaveBeenPaid = (params: String, data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/SecuritiesServiceCharg/GetSecuritiesHaveBeenPaid?" + params), {
    data
  }
  );
};

//获取type2的外层
export const GetLiquidationOfSecuritiesList = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/SecuritiesServiceCharg/GetLiquidationOfSecuritiesList"),
    {
      data
    }
  );
};

//获取type2的内层
export const GetListBySecurityCreditRatingId = (params: String) => {
  return http.request<any>(
    "post",
    baseUrlApi("/SecuritiesServiceCharg/GetListBySecurityCreditRatingId?" + params)
  );
};

//供应链假转账 因为还有抓取
export const UpdateCommerceEnterpriseToSpv = (params: string) => {
  return http.request<any>(
    "post",
    baseUrlApi("/FinancialTransactionsUsers/UpdateCommerceEnterpriseToSpv?" + params)
  );
};


//spv抓取
export const UpdateSpvBanlncerById = (params: string) => {
  return http.request<any>(
    "post",
    baseUrlApi("/AssetPool/UpdateSpvBanlncerById?" + params)
  );
};

//获取融资单的日期
export const GetSettlementTime = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/AssetPool/GetSettlementTime?" + params)
  );
};

export const FinancialTransactionsUsersGetByUsername = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/FinancialTransactionsUsers/GetByUsername?" + params)
  );
};

export const OnlineSettlementAndSupplyChainFinanceSettlementLoans = (data: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/ApplyPaymentSettlement/OnlineSettlementAndSupplyChainFinanceSettlementLoans"),
    { data }
  );
};
//这是更新供
export const ApplyPaymentSettlementUpdateIsSettlement = (params: string) => {
  return http.request<any>(
    "post",
    baseUrlApi("/ApplyPaymentSettlement/UpdateIsSettlement?" + params)
  );
};

export const ApplyPaymentSettlementUpdateIsDuePayment = (params: string) => {
  return http.request<any>(
    "post",
    baseUrlApi("/ApplyPaymentSettlement/UpdateIsDuePayment?" + params)
  );
};

export const TransferToInvestor = (params: string) => {
  return http.request<any>(
    "post",
    baseUrlApi("/TransactionsOredrs/TransferToInvestor?" + params)
  );
};


export const GetLegalFinalMaturityDate = (params: string) => {
  return http.request<any>(
    "get",
    baseUrlApi("/SecurityCreditRating/GetLegalFinalMaturityDate?" + params)
  );
};

export const UpdateSpvBalance = (params: string) => {
  return http.request<any>(
    "post",
    baseUrlApi("/FinancialTransactionsUsers/UpdateSpvBalance?" + params)
  );
};


export const ApplyPaymentSettlementCaltucate = (params: string) => {
  return http.request<any>(
    "post",
    baseUrlApi("/ApplyPaymentSettlement/Caltucate?" + params)
  );
};



